package com.jiyun.service.impl;

import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jiyun.mapper.RiderQueueMapper;
import com.jiyun.pojo.Orders;
import com.jiyun.pojo.RiderQueue;
import com.jiyun.service.IRiderQueueService;
import com.jiyun.utils.Result;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author author
 * @since 2024-11-27
 */
@Service
public class RiderQueueServiceImpl extends ServiceImpl<RiderQueueMapper, RiderQueue> implements IRiderQueueService {
    @Autowired
    private RiderQueueMapper riderQueueMapper;

    @Override
    public List<RiderQueue> findAll(Integer id) {
        return riderQueueMapper.findAll(id);
    }

    @Override
    public void updateDriverId(Integer id, Integer did) {
        riderQueueMapper.updateDriverId(id, did);
    }

    @Override
    public List<RiderQueue> findAll2(Integer did, Integer id) {
        return riderQueueMapper.findAll2(did, id);
    }

    @Override
    public void updateOrderType(Integer id) {
        riderQueueMapper.updateOrderType(id);
    }

    @Override
    public List<RiderQueue> findAll3(Integer id) {
        return riderQueueMapper.findAll3(id);
    }

    @Override
    public void updateStatus(Integer id) {
        riderQueueMapper.updateStatus(id);
    }

    @Override
    public void updateStatus2(Integer id) {
        riderQueueMapper.updateStatus2(id);
    }

    @Override
    public void getOneType(Integer did, Integer id) {
        riderQueueMapper.getOneType(did, id);
    }

    @Override
    public void getTwoType(Integer did, Integer id) {
        riderQueueMapper.getTwoType(did, id);
    }

    @Override
    public void getThreeType(Integer did, Integer id) {
        riderQueueMapper.getThreeType(did, id);

    }

    @Override
    public BigDecimal getList(Integer did, Integer id) {
        return riderQueueMapper.getList(did, id);
    }

    @Override
    public void driverAddress(String id, String driverLon, String driverLat) {
        riderQueueMapper.driverAddress(id, driverLon, driverLat);
    }

    @Override
    public void saveFees(BigDecimal highwayFee, BigDecimal roadBridgeFee, BigDecimal parkingFee, BigDecimal additionalFee, Integer id) {
        riderQueueMapper.saveFees(highwayFee, roadBridgeFee, parkingFee, additionalFee, id);
    }

    @Override
    public List<RiderQueue> findOne(Integer id) {

        List<RiderQueue> riderQueues = riderQueueMapper.findOne(id);

        return riderQueues;
    }


    @Override
    public List<RiderQueue> findStatus(Integer status) {
        return riderQueueMapper.findStatus(status);
    }

    @Override
    public String findOrderNumber(Integer id) {
        return riderQueueMapper.findOrderNumber(id);
    }

    @Override
    public BigDecimal getDriverSumPrive(Integer did) {
        return riderQueueMapper.getDriverSumPrive(did);
    }

}
